<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    for(i=1;i<=3;i++){
        var a=prompt("请输入账号")
        var b=prompt("请输入密码")
        if(a=='admin'&&b=='admin123'){
            alert("登陆成功！！！")
            break
        }
        alert("登录失败，还有"+(3-i)+"次机会")
        continue;
    }
</script>